package net.mingsoft.basic.resolver;

import net.mingsoft.base.resolver.*;
import org.springframework.stereotype.*;
import org.springframework.boot.context.properties.*;
import net.mingsoft.config.*;
import cn.hutool.core.util.*;
import java.io.*;

@Component
@EnableConfigurationProperties({ MultipartProperties.class })
public class CustomMultipartResolver extends MultipartResolver
{
    public CustomMultipartResolver(final MultipartProperties multipartProperties) throws IOException {
        if (ObjectUtil.isNotNull((Object)multipartProperties.getUploadTempDir())) {
            this.setUploadTempDir(multipartProperties.getUploadTempDir());
        }
        this.setDefaultEncoding(multipartProperties.getDefaultEncoding());
        this.setMaxUploadSize(multipartProperties.getMaxFileSize());
        this.setMaxUploadSizePerFile(multipartProperties.getMaxRequestSize());
        this.setMaxInMemorySize(multipartProperties.getMaxInMemorySize());
        this.setResolveLazily(multipartProperties.isResolveLazily());
        this.setExcludeUrls("jsp/editor.do");
    }
}
